package com.ianswer.px.posts.entity;

import org.apache.commons.lang.StringUtils;

public class PostRedisEntity {

	private Long addtime;
	private Long visit;
	private Long favor;
	private Long transferredtotal;
	private Long transferred;
	private Long commentstotal;
	private Long comments;
	private Long tranid;//转发的postId，不是转发则无值
	
	public Long getAddtime() {
		return addtime;
	}
	public void setAddtime(String addtime) {
		this.addtime = new Long(addtime);
	}
	public Long getVisit() {
		return visit;
	}
	public void setVisit(String visit) {
		this.visit = str(visit);
	}
	public Long getFavor() {
		return favor;
	}
	public void setFavor(String favor) {
		this.favor = str(favor);
	}
	public Long getTransferredtotal() {
		return transferredtotal;
	}
	public void setTransferredtotal(String transferredtotal) {
		this.transferredtotal = str(transferredtotal);
	}
	public Long getTransferred() {
		return transferred;
	}
	public void setTransferred(String transferred) {
		this.transferred = str(transferred);
	}
	public Long getCommentstotal() {
		return commentstotal;
	}
	public void setCommentstotal(String commentstotal) {
		this.commentstotal = str(commentstotal);
	}
	public Long getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = str(comments);
	}
	public Long getTranid() {
		return tranid;
	}
	public void setTranid(String tranid) {
		if (StringUtils.isEmpty(tranid)) {
			this.tranid = null;
		} else {
			this.tranid = new Long(tranid);
		}
		
	}
	
	private Long str(String str) {
		if (StringUtils.isEmpty(str)) {
			return new Long(0L);
		} else {
			return new Long(str);
		}
	}
}
